package com.ftg.learn.chapter12.manytomany;

import lombok.Data;

/**
 * @author kangjx
 * @createTime 2022/8/2
 */
@Data
public class DataUseTable {

    private int index = 0;

    public DataUseTable(int bikeCapacity){
        //容错
        personAndBikes = new PersonAndBike[bikeCapacity];
    }

    private PersonAndBike[] personAndBikes;

    public void add(PersonAndBike pab){
        //扩容

        this.personAndBikes[index++] =pab;
    }

}
